package cn.wenhe9.novel.service;

import cn.wenhe9.novel.domain.dto.ImgVerifyCodeDto;
import cn.wenhe9.novel.result.ResultResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * 资源（图片/视频/文档）相关服务类
 *
 * @author DuJinliang
 * 2022/5/18
 */
public interface ResourceService {

    /**
     * 获取图片验证码
     * @return Base64编码的图片
     * */
    ResultResponse<ImgVerifyCodeDto> getImgVerifyCode() throws IOException;

    /**
     * 上传图片
     */
    ResultResponse<String> uploadImg(MultipartFile file);
}
